package com.ruoyi.appointmentClose.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.appointmentClose.mapper.AppointmentCloseMapper;
import com.ruoyi.appointmentClose.domain.AppointmentClose;
import com.ruoyi.appointmentClose.service.IAppointmentCloseService;

/**
 * 不可预约时段Service业务层处理
 *
 * @author ch
 * @date 2022-07-26
 */
@Service
public class AppointmentCloseServiceImpl implements IAppointmentCloseService
{
    @Autowired
    private AppointmentCloseMapper appointmentCloseMapper;

    /**
     * 查询不可预约时段
     *
     * @param id 不可预约时段主键
     * @return 不可预约时段
     */
    @Override
    public AppointmentClose selectAppointmentCloseById(Long id)
    {
        return appointmentCloseMapper.selectAppointmentCloseById(id);
    }

    /**
     * 查询不可预约时段列表
     *
     * @param appointmentClose 不可预约时段
     * @return 不可预约时段
     */
    @Override
    public List<AppointmentClose> selectAppointmentCloseList(AppointmentClose appointmentClose)
    {
        return appointmentCloseMapper.selectAppointmentCloseList(appointmentClose);
    }

    /**
     * 新增不可预约时段
     *
     * @param appointmentClose 不可预约时段
     * @return 结果
     */
    @Override
    public int insertAppointmentClose(AppointmentClose appointmentClose)
    {
        appointmentClose.setCreateTime(DateUtils.getNowDate());
        return appointmentCloseMapper.insertAppointmentClose(appointmentClose);
    }

    /**
     * 修改不可预约时段
     *
     * @param appointmentClose 不可预约时段
     * @return 结果
     */
    @Override
    public int updateAppointmentClose(AppointmentClose appointmentClose)
    {
        appointmentClose.setUpdateTime(DateUtils.getNowDate());
        return appointmentCloseMapper.updateAppointmentClose(appointmentClose);
    }

    /**
     * 批量删除不可预约时段
     *
     * @param ids 需要删除的不可预约时段主键
     * @return 结果
     */
    @Override
    public int deleteAppointmentCloseByIds(Long[] ids)
    {
        return appointmentCloseMapper.deleteAppointmentCloseByIds(ids);
    }


    /**
     * 批量逻辑删除不可预约时段
     *
     * @param ids 需要删除的不可预约时段主键
     * @return 结果
     */
    @Override
    public int logicDeleteAppointmentClose(Long[] ids,String delType,Long delUser)
    {
        return appointmentCloseMapper.logicDeleteAppointmentClose(ids,delType,delUser);
    }

    /**
     * 删除不可预约时段信息
     *
     * @param id 不可预约时段主键
     * @return 结果
     */
    @Override
    public int deleteAppointmentCloseById(Long id)
    {
        return appointmentCloseMapper.deleteAppointmentCloseById(id);
    }
}
